﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class ChucNang_Admin_Admin_XuLyXoaDoiTac : System.Web.UI.Page
{
    int Id;
    protected void Page_Load(object sender, EventArgs e)
    {
        Id = int.Parse(Request.QueryString.Get("Id").ToString());
        if (Id == null)
        {
            Response.Redirect("Admin_XemDanhSachDoiTac.aspx");
        }


    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        int? kq = 0;
        DataDSTableAdapters.DOITACTableAdapter dtadapter = new DataDSTableAdapters.DOITACTableAdapter();
        dtadapter.DOITAC_XoaTheoId(Id, ref kq);
        if (kq == 0)
            Response.Write("<script>alert('Xóa thành công')</script>");
        else
            Response.Write("<script>alert('Xóa thất bại')</script>");
        
    }
}
